package com.cskaoyan.order.biz.handler;

import com.cskaoyan.order.biz.context.CreateOrderContext;
import com.cskaoyan.order.biz.context.TransHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 创建订单 参数校验
 *
 * @author: 叶熠彬
 * @date: 2022/7/29 19:56
 * @param:
 * @return:
 */
@Slf4j
@Component
public class ValidateHandler extends AbstractTransHandler {
@Autowired


    @Override
    public boolean isAsync() {
        return false;
    }

    @Override
    public boolean handle(TransHandlerContext context) {
        CreateOrderContext createOrderContext = (CreateOrderContext) context;
        List<Long> buyProductIds = createOrderContext.getBuyProductIds();

        return true;
    }
}
